const color = ['#F83A55', '#15D9F0']
export const LeftBottomLine2 = {
  backgroundColor: 'transparent',
  tooltip: {
    show: true,
    formatter: '{b}:{c}'
  },
  grid: {
    left: '5%',
    top: '12%',
    right: '10%',
    bottom: '8%',
    containLabel: true
  },

  xAxis: {
    type: 'value',
    show: false,
    position: 'top',
    axisTick: {
      show: false
    },
    axisLine: {
      show: false,
      lineStyle: {
        color: '#fff'
      }
    },
    splitLine: {
      show: false
    }
  },
  yAxis: [
    {
      type: 'category',
      axisTick: {
        show: false,
        alignWithLabel: false,
        length: 5
      },
      splitLine: {
        //网格线
        show: false
      },
      inverse: 'true', //排序
      axisLine: {
        show: false,
        lineStyle: {
          color: '#fff'
        }
      },
      axisLabel: {
        fontSize: 8
      },
      data: ['女', '男']
    }
  ],
  series: [
    {
      name: '能耗值',
      type: 'bar',
      label: {
        normal: {
          show: true,
          position: 'right',
          formatter: '{c}',
          textStyle: {
            color: 'white' //color of value
          }
        }
      },
      itemStyle: {
        normal: {
          show: true,
          color:(params)=>{
            return color[params.dataIndex]
          },
          barBorderRadius: 70,
          borderWidth: 0,
          borderColor: '#333'
        }
      },
      barGap: '0%',
      barCategoryGap: '50%',
      data: [60, 132]
    }
  ]
}
